package com.huawei.appmarket.service.appdetail.view.widget;

import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.ImageView;
import com.huawei.appgallery.share.api.ShareBean;
import o.baa;
import o.cww;
import o.doo;
import o.eni;
import o.enx;
import o.evk;
import o.ewm.n;
import o.fho;

public class DetailShareButton extends ImageView implements OnClickListener {
    private String ʻ;
    private int ʼ;
    private int ʽ;
    private String ˊ;
    private String ˋ;
    private String ˎ;
    private String ˏ;
    private int ͺ;
    private String ॱ;
    private String ॱॱ;
    private boolean ᐝ;

    public DetailShareButton() {
        this(null);
    }

    public DetailShareButton(Context context) {
        this(context, null);
    }

    public DetailShareButton(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        this.ᐝ = false;
        this.ͺ = 0;
    }

    public DetailShareButton(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        this.ᐝ = false;
        this.ͺ = 0;
    }

    public String ˎ() {
        return this.ˏ;
    }

    public void setTitle(String str) {
        this.ˏ = str;
    }

    public String ˊ() {
        return this.ˋ;
    }

    public void setIcon(String str) {
        this.ˋ = str;
    }

    public String ˏ() {
        return this.ˊ;
    }

    public void setShareUrl(String str) {
        this.ˊ = str;
    }

    public String ˋ() {
        return this.ॱ;
    }

    public void setAppId(String str) {
        this.ॱ = str;
    }

    public String ॱ() {
        return this.ॱॱ;
    }

    public void setVersion(String str) {
        this.ॱॱ = str;
    }

    public String ʽ() {
        return this.ʻ;
    }

    public void setPackageName(String str) {
        this.ʻ = str;
    }

    public boolean ʻ() {
        return this.ᐝ;
    }

    public void setH5App(boolean z) {
        this.ᐝ = z;
    }

    public void setShareType(int i) {
        this.ͺ = i;
    }

    public String ᐝ() {
        return this.ˎ;
    }

    public void setShareContent(String str) {
        this.ˎ = str;
    }

    public int ॱॱ() {
        return this.ʽ;
    }

    public void setCtype(int i) {
        this.ʽ = i;
    }

    public int ʼ() {
        return this.ʼ;
    }

    public void setNavigationColor(int i) {
        this.ʼ = i;
    }

    public void onClick(View view) {
        ͺ();
    }

    public void ͺ() {
        if (doo.ˊ(getContext())) {
            ShareBean shareBean = new ShareBean();
            shareBean.ॱ(ᐝ());
            shareBean.ˎ(ˎ());
            shareBean.ˋ(ˊ());
            shareBean.ˊ(getContext().getResources().getIdentifier(getContext().getString(n.ʼﾟ), "drawable", getContext().getPackageName()));
            shareBean.ˊ(ˏ());
            shareBean.ˏ("appdetail");
            shareBean.ʽ(ˋ());
            shareBean.ʼ(ʽ());
            shareBean.ॱॱ(ॱ());
            shareBean.ˎ(ʻ());
            shareBean.ˏ(this.ͺ);
            shareBean.ॱ(ॱॱ());
            shareBean.ˎ(ʼ());
            ((cww) fho.ˏ().ˋ("Share").ॱ(cww.class)).ˎ(getContext(), shareBean);
            return;
        }
        evk.ˋ(getContext(), getContext().getString(n.ʹˊ), 0).ˋ();
    }

    public void ˋ(WebView webView, String str) {
        if (doo.ˊ(getContext())) {
            ShareBean shareBean = new ShareBean();
            shareBean.ॱ(ᐝ());
            shareBean.ˎ(ˎ());
            shareBean.ˋ(ˊ());
            shareBean.ˊ(getContext().getResources().getIdentifier(getContext().getString(n.ʼﾟ), "drawable", getContext().getPackageName()));
            shareBean.ʽ(ˋ());
            shareBean.ʼ(ʽ());
            shareBean.ॱॱ("Reserve");
            shareBean.ˎ(ʻ());
            shareBean.ʽ(3);
            Object ˎ = enx.ˎ(str);
            if (TextUtils.isEmpty(ˎ)) {
                ((Activity) getContext()).runOnUiThread(new eni(webView, str, shareBean));
                return;
            }
            shareBean.ˊ(baa.ˏ(ˎ));
            ((cww) fho.ˏ().ˋ("Share").ॱ(cww.class)).ˎ(getContext(), shareBean);
            return;
        }
        evk.ˋ(getContext(), getContext().getString(n.ʹˊ), 0).ˋ();
    }

    public void ˊॱ() {
        if (doo.ˊ(getContext())) {
            ShareBean shareBean = new ShareBean();
            shareBean.ॱ(ᐝ());
            shareBean.ˎ(ˎ());
            shareBean.ˋ(ˊ());
            shareBean.ˊ(getContext().getResources().getIdentifier(getContext().getString(n.ʼﾟ), "drawable", getContext().getPackageName()));
            shareBean.ˊ(ˏ());
            shareBean.ʽ(ˋ());
            shareBean.ʼ(ʽ());
            shareBean.ॱॱ("orderappdetail");
            ((cww) fho.ˏ().ˋ("Share").ॱ(cww.class)).ˎ(getContext(), shareBean);
            return;
        }
        evk.ˋ(getContext(), getContext().getString(n.ʹˊ), 0).ˋ();
    }
}
